
<div class="row clearfix">
    
        
                <Legend>Saldo Rekening</legend>
                <?php //echo $this->today; ?>

<div class="col-md-6 column">
    <form method="post" id="frm" name="frm">

            <?php //echo $this->today;?>


            <br>
            <!-- fromAcc input-->
            <div class="form-group">
                
                  <input id="account_num" name="account_num" type="text" placeholder="Nomor Akun"
                 class="form-control" >

                 <button class="btn btn-default" type="button" id="btnSubmit" name="btnSubmit"
                         onclick="getData()">
                    Submit</button> 
            </div>
          
    </form>
    </div>

                <br><br><br><br><br><br><br>
    <div class="col-md-12 column">

    <table id="saldo" class="easyui-datagrid" title="Saldo Rekening" style="height:400px"
                data-options="
                        url: '<?php echo $this->baseUrl() ?>/jsondata/saldoadmin',
                        fitColumns: false,
                        singleSelect: true,
                        rownumbers: true,
                        autoRowHeight:true,
                        autoRowWidth:true,
                        pagination:true,
                        pageSize:10
                ">
        <thead>
                <tr>
                        <th data-options="field:'account_num',width:110">Nomor Akun</th>
                        <th data-options="field:'account_name',width:110">Nama Akun</th>
                        <th data-options="field:'bank_name',width:80">Bank</th>
                        <th data-options="field:'bank_account_no',width:100">No Rekening</th>
                        <th data-options="field:'balance',width:100" align="right">Saldo</th>

                </tr>
        </thead>
    </table>
    <br>


</div>
</div>

<script>

function getData(){

            var accNum = $('#account_num').val();

            $('#saldo').datagrid({
                queryParams: {
                page: 1,
                rows: 10,
                accNum: accNum
                }
                });

            var pager = $('#saldo').datagrid('getPager');	// get the pager of datagrid
            pager.pagination({
                    buttons:[{
                            iconCls:'icon-pdf',
                            handler:function(){
                                    downloadPDF();
                            }
                    }]
            });
    }
</script>





